<?php namespace Summer\Sms;

use System\Classes\PluginBase;
use Backend;

class Plugin extends PluginBase
{
    public function registerComponents()
    {
        return [
            'Summer\Sms\Components\Sms' => 'sms',
        ];
    }
    public function registerSettings()
    {
        return [
            'settings' => [
                'label'       => 'SMS设置',
                'description' => '基础|网关设置',
                'category'    => 'SMS',
                'icon'        => 'oc-icon-envelope',
                'class'       => 'Summer\Sms\Models\Settings',
                'permissions' => ['summer.sms.permissions.sms_base'],
                'order'       => 600,
            ],
            'scene' => [
                'label'       => '场景管理',
                'description' => '短信发送场景管理',
                'category'    => 'SMS',
                'icon'        => 'oc-icon-envelope-o',
                'url'         => Backend::url('summer/sms/scene'),
                'permissions' => ['summer.sms.permissions.sms_base'],
                'order'       => 601,
            ],
            'record' => [
                'label'       => '记录管理',
                'description' => '短信发送记录管理',
                'category'    => 'SMS',
                'icon'        => 'oc-icon-archive',
                'url'         => Backend::url('summer/sms/record'),
                'permissions' => ['summer.sms.permissions.sms_base'],
                'order'       => 602,
            ]
        ];
    }
}
